Merged
Conversation
…eference old code.
… doctests aren't passing. Going to attempt to replace #[events()] with a #[event_handler] proc macro impl block again.
…tes, change names, LSP support working with proc macro etc.
…ld proc macro, different code gen etc.
…han wanted behavour and thus I will be adding command API and maybe better error handling to the handler fns.
…e rough edges, add more testing and then will be good for release
…mmand attr, removed the extra proc macro, cleaner code overall imo.
There was a problem hiding this comment.
Pull request overview
This PR introduces a comprehensive Rust client SDK for the Dragonfly plugin system. The implementation includes a code generation pipeline, procedural macros for ergonomic API design, and extensive documentation and testing.
Key Changes:
- Added debug logging to Go plugin adapters for event tracking and timing
- Implemented a complete Rust SDK with derive macros, event handlers, and command system
- Created a 3-phase code generation pipeline (proto → prost → xtask-generated ergonomic API)
Reviewed changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
plugin/adapters/plugin/process.go |
Added debug logging for event lifecycle tracking |
plugin/adapters/plugin/manager.go |
Added timing and debug logs for event dispatch |
packages/rust/xtask/src/utils.rs |
AST parsing utilities for code generation |
packages/rust/xtask/src/*.rs |
Code generators for handlers, mutations, and actions |
packages/rust/src/lib.rs |
Main SDK entry point with connection handling |
packages/rust/src/event/* |
Event system implementation |
packages/rust/src/command.rs |
Command parsing and execution framework |
packages/rust/macro/src/* |
Procedural macros for Plugin and Command derives |
packages/rust/tests/* |
Integration tests for SDK components |
examples/plugins/rust/* |
Example economy plugin demonstrating SDK usage |
packages/rust/README.md |
Comprehensive SDK documentation |
packages/rust/MAINTAINING.md |
Maintainer guide for code generation pipeline |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
looks good to me! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The rust client
adds bindings ontop of the generated proto into a nice crate style.
Has documentation, tests (unit, trybuild, snapshots).
examples in readmes and in examples/plugin and in the packages/rust/example. One complex one simple.